using System;
using System.Collections.Generic;
using System.Text;
using NGinnBPM.Lib.Data;
using System.Runtime.Serialization;
using System.ServiceModel;
using NGinnBPM.Lib.Operations.ExternalServices;

namespace NGinnBPM.Lib.Interfaces.Worklist
{
    /// <summary>
    /// Interface for creating and tracking work items. It is used by workflow engine for assigning tasks to people.
    /// </summary>
    [ServiceContract]
    public interface IWorkListService
    {
        /// <summary>
        /// Create a new work item
        /// </summary>
        /// <param name="wi"></param>
        [OperationContract]
        string CreateWorkItem(CreateWorkItem wi);
        /// <summary>
        /// Cancel a work item
        /// </summary>
        /// <param name="instanceId"></param>
        [OperationContract]
        void CancelWorkItem(string workItemId, string taskInstanceId);
        /// <summary>
        /// Callback from NGinn to inform that work item has completed.
        /// </summary>
        /// <param name="instanceId"></param>
        [OperationContract]
        void WorkItemCompleted(string workItemId, string taskInstanceId);
    }
}
